<template>
  <div>
    <span :class="iconCls"></span>
  </div>
</template>

<script>
export default {
  name: 'ImgIcon',
  props: {
    size: {
      type: String
    },
    imgname: {
      type: String
    }
  },
  computed: {
    iconCls() {
      return `icon-${this.size} ${this.imgname}-bg`
    }
  }
}
</script>

<style lang="scss" scoped>
  .icon-1{
    width:24px;
    height:26px;
    display: inline-block;

  }
  .user-bg{
    background: url('../../assets/images/user.png') top center no-repeat;
  }
  .key-bg{
    background: url('../../assets/images/key.jpg') no-repeat;
  }

</style>
